package com.itqf.controller;

import com.itqf.annotation.RequiresPermissionsDesc;
import com.itqf.dto.DtsSearchDto;
import com.itqf.service.DtsUserService;
import com.itqf.util.ResponseUtil;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * projectName: shop_manage
 *
 * @author: MaTianWei
 * time: 2021/7/15 22:22
 * description:会员模块
 */
@RestController
@CrossOrigin("*")
@RequestMapping("/admin/user")
public class AdminUserController {

    @Autowired
    private DtsUserService dtsUserService;
    public Logger logger = LoggerFactory.getLogger(AdminAdminController.class);
    //会员模糊查询和显示
    @RequiresPermissions("admin:user:list")
    @RequiresPermissionsDesc(menu = {"会员管理","会员列表"},button = "会员列表展示")
    @GetMapping("list")
    public Object list(DtsSearchDto userDto){
        logger.debug("[管理员列表]管理员列表查询参数:{}",userDto);
        Map data = dtsUserService.findUserByPage(userDto);
        logger.debug("[会员列表]分页查询数据为",data);
        return ResponseUtil.ok(data);
    }




    //会员权限管理/admin/user/detailApprove






    //佣金推广管理admin/brokerage/list
}
